package com.gvfish.backingbean.admin;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;

import com.google.appengine.api.memcache.MemcacheService;
import com.google.appengine.api.memcache.MemcacheServiceFactory;
import com.google.appengine.api.memcache.Stats;

@ManagedBean
@RequestScoped
public class CacheInfo {
	private Stats stats;
	MemcacheService ms = MemcacheServiceFactory.getMemcacheService();

	public void setStats(Stats stats) {
		this.stats = stats;
	}

	public Stats getStats() {
		stats = ms.getStatistics();
		return stats;
	}
	
	public String clearCache(){
		System.out.println("in clear Cache");
		ms.clearAll();
		return null;
	}
	
	
}
